package cn.edu.jxust.core.infrastructure.mapper;

import cn.edu.jxust.common.domain.entity.Area;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

/**
 * @author QiuKangming
 * @since 2020-06-29
 */

public interface AreaMapper extends BaseMapper<Area> {

    /**
     * 根据 id 获取区域名称
     * @param id 区域id号
     * @return String
     */
    @Select("SELECT area_name FROM t_area WHERE id = #{id} AND status = 1")
    String getAreaNameById(@Param("id") Integer id);

}
